<?php

declare (strict_types=1);
namespace App\Model;

/**
 * @property int $id 
 * @property string $name 
 * @property string $address 
 * @property string $lng 
 * @property string $lat 
 * @property \Carbon\Carbon $created_at 
 * @property \Carbon\Carbon $updated_at 
 * @property string $deleted_at 
 * @property int $create_by 
 * @property int $update_by 
 * @property int $delete_by 
 */
class FlyBusinessDistrict extends CloudBase
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'fly_business_district';
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [];
    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = ['id' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime', 'create_by' => 'integer', 'update_by' => 'integer', 'delete_by' => 'integer'];

//    public  function link_file()
//    {
//        return $this->hasMany(Fl)
//    }

    public function pic_list()
    {
        return $this->hasMany(LinkFile::class, 'link_id', 'id')
            ->where('fly_link_file.type', 7)
            ->with('file_info')
            ->select();
    }
}